<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>合作商数据分析</title>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
    <%@include file="../include/commonFile.jsp" %>
</head>
<body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">

            <form class="layui-form" action="${ctx}/merchant/analyze/list.do" id="myForm" method="post">
                <input type="hidden" name="pageNo" id="pageNo"/>
                <div class="f-search-bar">
                    <div class="search-container">
                        <ul class="search-form-content">
                            <li class="form-item-inline"><label class="search-form-lable">昵称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" autocomplete="off" class="layui-input"
                                           value="${memberMerchantDetailQuery.name}" placeholder="昵称">
                                </div>
                            </li>
                            <li class="form-item-inline"><label class="search-form-lable">手机</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="mobile" autocomplete="off" class="layui-input"
                                           value="${memberMerchantDetailQuery.mobile}" placeholder="手机">
                                </div>
                            </li>
                            <li class="form-item-inline">
                                <div class="sub-btns">
                                    <a class="layui-btn layui-btn-danger"
                                       href="javascript:submitFunction('#myForm')">查询</a>
                                    <a class="layui-btn layui-btn-normal"
                                       href="javascript:resetFunction('#myForm')">重置</a>
                                </div>
                            </li>
                        </ul>
                        <ul class="search-form-content">
                            <li class="form-item">
                                <label class="search-form-lable">时间</label>
                                <div class="check-btn-inner">
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),'','#myForm')" ${empty memberMerchantDetailQuery.timeType ? 'class="active"' : ''}>全部</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),1,'#myForm')" ${memberMerchantDetailQuery.timeType == 1 ? 'class="active"' : ''}>今日</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),2,'#myForm')" ${memberMerchantDetailQuery.timeType == 2 ? 'class="active"' : ''}>昨日</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),3,'#myForm')" ${memberMerchantDetailQuery.timeType == 3 ? 'class="active"' : ''}>本周</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),4,'#myForm')" ${memberMerchantDetailQuery.timeType == 4 ? 'class="active"' : ''}>本月</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),5,'#myForm')" ${memberMerchantDetailQuery.timeType == 5 ? 'class="active"' : ''}>历史</a>
                                    <input type="hidden" name="timeType" value="${memberMerchantDetailQuery.timeType}"/>
                                </div>
                                <div class="cl"></div>
                            </li>
                            <li class="form-item">
                                <label class="search-form-lable">排序</label>
                                <div class="check-btn-inner">
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),0,'#myForm')" ${empty memberMerchantDetailQuery.sort || memberMerchantDetailQuery.sort == 0 ? 'class="active"' : ''}>报名</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),1,'#myForm')" ${memberMerchantDetailQuery.sort == 1 ? 'class="active"' : ''}>订单</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),2,'#myForm')" ${memberMerchantDetailQuery.sort == 2 ? 'class="active"' : ''}>访问</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),3,'#myForm')" ${memberMerchantDetailQuery.sort == 3 ? 'class="active"' : ''}>会员</a>
                                    <a href="javascript:void(0);"
                                       onclick="setTimeType($(this),4,'#myForm')" ${memberMerchantDetailQuery.sort == 4 ? 'class="active"' : ''}>资金</a>
                                    <input type="hidden" name="sort" value="${memberMerchantDetailQuery.sort}"/>
                                </div>
                                <div class="cl"></div>
                            </li>
                        </ul>
                    </div>
                </div>
            </form>
            <div class="list-content">
                <div class="cl">
                    <table class="layui-table">
                        <colgroup>
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>昵称</th>
                            <th>手机</th>
                            <th>报名</th>
                            <th>订单</th>
                            <th>资金</th>
                            <th>访问</th>
                            <th>会员</th>
                            <th>实名会员</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="analyze" items="${list}">
                            <tr>
                                <td class="table-member">
                                    <div class="member-name ellipsis-1"
                                         title="${analyze.name}">${analyze.name}</div>
                                </td>
                                <td>
                                        ${analyze.mobile}
                                </td>

                                <td>
                                        ${analyze.applyNum}
                                </td>
                                <td>
                                        ${analyze.orderNum}
                                </td>
                                <td>
                                       <fmt:formatNumber value="${analyze.money}" pattern="0.00"/>
                                </td>
                                <td>
                                        ${analyze.viewNum}
                                </td>
                                <td>
                                        ${analyze.memberNum}
                                </td>
                                <td>
                                        ${analyze.realMemberNum}
                                </td>
                                <td class="tb-opts">
                                    <div class="comm-opts">
                                        <a href="${ctx}/merchant/analyze/detail.do?memberId=${analyze.memberId}"
                                           target="_self">
                                            详情
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div id="page_content" class="page-container"></div>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
</div>



<script type="text/javascript" src="${ctx}/script/common/list.js"></script>
<script type="text/javascript" src="${ctx}/script/common/table_option.js"></script>
<script type="text/javascript">
    $(function () {
//加载分页
        loadPageNew({elem: 'page_content', totalCount: '${page.totalCount}', limit: '${page.limit}', page: '${page.page}'});
    })

</script>
<script type="text/javascript">
    txz.initHeader({
        nav:[{
            name: '合作商数据分析',
            curr: true
        }],
        info:'<span class="f12">共<b id="totalCount">${page.totalCount}</b>条记录</span>'
    });
</script>
</body>
</html>